Optimal. Leaf size=109 \[ -\frac {d (e f+2 d g) (3 e f+2 d g) x}{e^2}-\frac {\left (e^2 f^2+6 d e f g+4 d^2 g^2\right ) x^2}{2 e}-\frac {1}{3} g (2 e f+3 d g) x^3-\frac {1}{4} e g^2 x^4-\frac {4 d^2 (e f+d g)^2 \log (d-e x)}{e^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {862, 90}
\begin {gather*} -\frac {4 d^2 (d g+e f)^2 \log (d-e x)}{e^3}-\frac {x^2 \left (4 d^2 g^2+6 d e f g+e^2 f^2\right )}{2 e}-\frac {d x (2 d g+e f) (2 d g+3 e f)}{e^2}-\frac {1}{3} g x^3 (3 d g+2 e f)-\frac {1}{4} e g^2 x^4 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rule 862
Rubi steps
\begin {align*} \int \frac {(d+e x)^3 (f+g x)^2}{d^2-e^2 x^2} \, dx &=\int \frac {(d+e x)^2 (f+g x)^2}{d-e x} \, dx\\ &=\int \left (\frac {d (-3 e f-2 d g) (e f+2 d g)}{e^2}-\frac {\left (e^2 f^2+6 d e f g+4 d^2 g^2\right ) x}{e}-g (2 e f+3 d g) x^2-e g^2 x^3-\frac {4 d^2 (e f+d g)^2}{e^2 (-d+e x)}\right ) \, dx\\ &=-\frac {d (e f+2 d g) (3 e f+2 d g) x}{e^2}-\frac {\left (e^2 f^2+6 d e f g+4 d^2 g^2\right ) x^2}{2 e}-\frac {1}{3} g (2 e f+3 d g) x^3-\frac {1}{4} e g^2 x^4-\frac {4 d^2 (e f+d g)^2 \log (d-e x)}{e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 103, normalized size = 0.94 \begin {gather*} -\frac {e x \left (48 d^3 g^2+24 d^2 e g (4 f+g x)+12 d e^2 \left (3 f^2+3 f g x+g^2 x^2\right )+e^3 x \left (6 f^2+8 f g x+3 g^2 x^2\right )\right )+48 d^2 (e f+d g)^2 \log (d-e x)}{12 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 149, normalized size = 1.37
method | result | size |
norman | \(-\frac {e \,g^{2} x^{4}}{4}-\frac {g \left (3 d g +2 e f \right ) x^{3}}{3}-\frac {\left (4 d^{2} g^{2}+6 d e f g +e^{2} f^{2}\right ) x^{2}}{2 e}-\frac {d \left (4 d^{2} g^{2}+8 d e f g +3 e^{2} f^{2}\right ) x}{e^{2}}-\frac {4 d^{2} \left (d^{2} g^{2}+2 d e f g +e^{2} f^{2}\right ) \ln \left (-e x +d \right )}{e^{3}}\) | \(122\) |
risch | \(-\frac {e \,g^{2} x^{4}}{4}-x^{3} d \,g^{2}-\frac {2 e \,x^{3} f g}{3}-\frac {2 x^{2} d^{2} g^{2}}{e}-3 x^{2} d f g -\frac {e \,x^{2} f^{2}}{2}-\frac {4 d^{3} g^{2} x}{e^{2}}-\frac {8 d^{2} f g x}{e}-3 d \,f^{2} x -\frac {4 d^{4} \ln \left (-e x +d \right ) g^{2}}{e^{3}}-\frac {8 d^{3} \ln \left (-e x +d \right ) f g}{e^{2}}-\frac {4 d^{2} \ln \left (-e x +d \right ) f^{2}}{e}\) | \(142\) |
default | \(-\frac {\frac {g^{2} e^{3} x^{4}}{4}+\frac {\left (\left (2 d g +e f \right ) e^{2} g +e g \left (g d e +e^{2} f \right )\right ) x^{3}}{3}+\frac {\left (\left (2 d g +e f \right ) \left (g d e +e^{2} f \right )+e g \left (2 d^{2} g +3 d e f \right )\right ) x^{2}}{2}+\left (2 d g +e f \right ) \left (2 d^{2} g +3 d e f \right ) x}{e^{2}}-\frac {4 d^{2} \left (d^{2} g^{2}+2 d e f g +e^{2} f^{2}\right ) \ln \left (-e x +d \right )}{e^{3}}\) | \(149\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 133, normalized size = 1.22 \begin {gather*} -4 \, {\left (d^{4} g^{2} + 2 \, d^{3} f g e + d^{2} f^{2} e^{2}\right )} e^{\left (-3\right )} \log \left (x e - d\right ) - \frac {1}{12} \, {\left (3 \, g^{2} x^{4} e^{3} + 4 \, {\left (3 \, d g^{2} e^{2} + 2 \, f g e^{3}\right )} x^{3} + 6 \, {\left (4 \, d^{2} g^{2} e + 6 \, d f g e^{2} + f^{2} e^{3}\right )} x^{2} + 12 \, {\left (4 \, d^{3} g^{2} + 8 \, d^{2} f g e + 3 \, d f^{2} e^{2}\right )} x\right )} e^{\left (-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.31, size = 131, normalized size = 1.20 \begin {gather*} -\frac {1}{12} \, {\left (48 \, d^{3} g^{2} x e + {\left (3 \, g^{2} x^{4} + 8 \, f g x^{3} + 6 \, f^{2} x^{2}\right )} e^{4} + 12 \, {\left (d g^{2} x^{3} + 3 \, d f g x^{2} + 3 \, d f^{2} x\right )} e^{3} + 24 \, {\left (d^{2} g^{2} x^{2} + 4 \, d^{2} f g x\right )} e^{2} + 48 \, {\left (d^{4} g^{2} + 2 \, d^{3} f g e + d^{2} f^{2} e^{2}\right )} \log \left (x e - d\right )\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.22, size = 109, normalized size = 1.00 \begin {gather*} - \frac {4 d^{2} \left (d g + e f\right )^{2} \log {\left (- d + e x \right )}}{e^{3}} - \frac {e g^{2} x^{4}}{4} - x^{3} \left (d g^{2} + \frac {2 e f g}{3}\right ) - x^{2} \cdot \left (\frac {2 d^{2} g^{2}}{e} + 3 d f g + \frac {e f^{2}}{2}\right ) - x \left (\frac {4 d^{3} g^{2}}{e^{2}} + \frac {8 d^{2} f g}{e} + 3 d f^{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.12, size = 139, normalized size = 1.28 \begin {gather*} -4 \, {\left (d^{4} g^{2} + 2 \, d^{3} f g e + d^{2} f^{2} e^{2}\right )} e^{\left (-3\right )} \log \left ({\left | x e - d \right |}\right ) - \frac {1}{12} \, {\left (3 \, g^{2} x^{4} e^{5} + 12 \, d g^{2} x^{3} e^{4} + 24 \, d^{2} g^{2} x^{2} e^{3} + 48 \, d^{3} g^{2} x e^{2} + 8 \, f g x^{3} e^{5} + 36 \, d f g x^{2} e^{4} + 96 \, d^{2} f g x e^{3} + 6 \, f^{2} x^{2} e^{5} + 36 \, d f^{2} x e^{4}\right )} e^{\left (-4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.59, size = 197, normalized size = 1.81 \begin {gather*} -x^3\,\left (\frac {2\,g\,\left (d\,g+e\,f\right )}{3}+\frac {d\,g^2}{3}\right )-x^2\,\left (\frac {d^2\,g^2+4\,d\,e\,f\,g+e^2\,f^2}{2\,e}+\frac {d\,\left (2\,g\,\left (d\,g+e\,f\right )+d\,g^2\right )}{2\,e}\right )-x\,\left (\frac {d\,\left (\frac {d^2\,g^2+4\,d\,e\,f\,g+e^2\,f^2}{e}+\frac {d\,\left (2\,g\,\left (d\,g+e\,f\right )+d\,g^2\right )}{e}\right )}{e}+\frac {2\,d\,f\,\left (d\,g+e\,f\right )}{e}\right )-\frac {\ln \left (e\,x-d\right )\,\left (4\,d^4\,g^2+8\,d^3\,e\,f\,g+4\,d^2\,e^2\,f^2\right )}{e^3}-\frac {e\,g^2\,x^4}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________